Carbon


GetThemeTrackBounds

Header: Appearance.h Carbon status: Supported

Obtains the bounding rectangle of a track.

OSStatus GetThemeTrackBounds (
    const ThemeTrackDrawInfo *drawInfo, 
    Rect *bounds
);
drawInfo

A pointer to a structure of type ThemeTrackDrawInfo. Before calling GetThemeTrackBounds, set the structure to describe the current visual characteristics of the track. Typically, the rectangle you specify in ThemeTrackDrawInfo.bounds is the proposed bounding rectangle for the track. GetThemeTrackBounds examines this rectangle to determine the actual bounds that the track would occupy. Depending on the track type, the actual bounding rectangle for a track might contain an absolute or fixed value (as for the height of a progress bar, which is always 14 pixels). Or, the track bounds might scale (as for a scroll bar) to fit the proposed bounds.

bounds

A pointer to a structure of type Rect. On return, the rectangle contains the actual boundary of the track, in local coordinates. Note that the rectangle produced does not include in its bounds any tick marks that a track (such as a slider) might have; tick marks are drawn outside the track rectangle. Similarly, for a scroll bar, the rectangle produced does not contain the scroll bar arrows, just the track itself.

function result

A result code.

DISCUSSION

Your application may call the GetThemeTrackBounds function to obtain the actual rectangle containing a track under the current theme.

VERSION NOTES

This function is available with Appearance Manager 1.1 and later.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)